import 'package:flutter/material.dart';

class ShowLargeImage extends StatelessWidget {
  ShowLargeImage(this.image);

  final Image image;

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Positioned(
          child: Container(
            color: Colors.black,
          ),
        ),
        Center(
          child: Container(
            width: MediaQuery.of(context).size.width,
            child: InteractiveViewer(
              child: image,
            ),
          ),
        ),
        Positioned(
          left: 10,
          top: MediaQuery.of(context).padding.top + 10,
          child: IconButton(
            padding: EdgeInsets.zero,
            color: Colors.black12,
            icon: Icon(
              Icons.close,
              color: Colors.white,
            ),
            onPressed: () {
              Navigator.of(context).pop();
            },
          ),
        ),
      ],
    );
  }
}
